import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
  SectionList,
  TouchableOpacity,
} from 'react-native';

import Util from './../../util/util';
// import Video from 'react-native-video';
 var sections = [
      { key: "A", data: [{ title: "阿童木" }, { title: "阿玛尼" }, { title: "爱多多" }] },
    ];
export default class awards extends Component<{}> {
    static navigationOptions = {
        headerTitle: '获奖通知',
    };
    constructor(props) {
      super(props);
      this.state = {
        dataSource: sections
      };
    }
    render() {
        return (
            <View style={styles.container} >
                <View style={styles.video} >
                </View>
                <SectionList
                  renderSectionHeader={this._sectionComp}
                  renderItem={this._renderItem}
                  sections={this.state.dataSource}
                  />
            </View>
        );
    }
    _renderItem() {
      return(
        <View>
            <TouchableOpacity style={[styles.item, styles.row]} >
              <View>
                <Text style={{fontSize:14,color:'#333'}} >成功支付订单</Text>
                <Text style={{fontSize:12,color:'#999',marginTop:5*Util.size.height/667}} >2017-08-10 15:32</Text>
              </View>
              <Text style={{fontSize:18,color:'#D90016'}}>500元</Text>
            </TouchableOpacity>
            <View style={{backgroundColor:'#D8D8D8',height:Util.pixel,marginLeft:12*Util.size.width/375,marginRight:12*Util.size.width/375}}></View>
        </View>

      )
    }
    _sectionComp() {
      return(
        <View style={{backgroundColor:'#F7F7F7',padding: 12*Util.size.width/375,}} >
          <Text style={{fontSize:13,color:'#E31B1B'}}>中奖名单</Text>
        </View>
      )
    }
}
const styles = StyleSheet.create({
    container: {
        flex: 1
    },
    video: {
      height: 196*Util.size.height/667,
    },
    item:{
      // height:70,
      paddingTop: 14*Util.size.height/667,
      paddingBottom: 14*Util.size.height/667,
      paddingLeft: 12*Util.size.width/375,
      paddingRight: 12*Util.size.width/375,
      backgroundColor: '#fff'
    },
    row:{
      flexDirection: 'row',
      justifyContent: 'space-between'
    },
})
